import request from '@/utils/request'

export const getPindaoAPI = () => {
  return request({
    url: '/v1_0/user/channels'
  })
}
export const getAllPindaoAPI = () => {
  return request({
    url: '/v1_0/channels'
  })
}

export const deletePindaoAPI = (id) => {
  return request({
    method: 'DELETE',
    url: `/v1_0/user/channels/${id}`
  })
}
export const addPindaoAPI = (id, seq) => {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: {
      channels: [
        {
          id,
          seq
        }
      ]
    }
  })
}